<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <script src="/static/jquery-2.1.3.min.js"></script>
    <style>
        body {
            background: rgb(248, 248, 248);
        }
        a{
            text-decoration:none;
            color:#555;
        }
        a:hover {
            background-color: #00b38a;
            color: #fff;
        }
        #choose{
            position: relative;
            padding: 5px 22px 5px 8px;
            background-color: #00b38a;
            color: #fff;
        }
        #qzyx {
            color: #0084bb;
            /*line-height:26px;*/
            padding-bottom: 5px;
        }
        #xl {
            /*line-height:26px;*/
            padding-bottom: 5px;
            background: white;

        }
        #desc {
            line-height: 26px;
        }

        .search {
            width: 980px;
            margin: 0 auto;
            padding: 20px;
        }

        .result {
            height:auto;
            width: 980px;
            margin: 0 auto;
            background: white;
            padding: 20px;
            color:#555;
        }
    </style>
<head>
    <title>信息搜索</title>
    <script>
        $(function () {

        });
    </script>
</head>
<body>
<div class="search">
    <form action="/search/fact" method="get">
        <input type="text" name="keyWords" style="width:820px;height:23px"; value="${kw}"/>
        <input type="submit"  style="height:30px"; value="搜索一下">
        <input type="hidden" value="1" name="pageNum">
    </form>
    <br>
    <c:if test="${! empty edu }">
    <div id="xl"><font color="#555"><b>学历:</b></font>
        <c:forEach items="${edu}" var="bean">
            <c:choose>
                <c:when test="${eduClieck==bean.name}">
                   <span id="choose"> <a href="/search/fact?pageNum=${page.previousPageNum }&keyWords=${kw}&edu=${bean.name}"><font color="#fff"><b>${bean.name}(${bean.count})</b></font></a></span>
                </c:when>
                <c:otherwise>
                    <a href="/search/fact?pageNum=${page.previousPageNum }&keyWords=${kw}&edu=${bean.name}">${bean.name}(${bean.count})</a>
                </c:otherwise>
            </c:choose>
        </c:forEach>
        </div>
    </c:if>
    <br>
    <c:if test="${! empty year }">
        <div id="xl"><font color="#555"><b>工作年限:</b></font>
            <c:forEach items="${year}" var="bean">
                <c:choose>
                    <c:when test="${months==bean.name}">
                       <span id="choose"> <a href="/search/fact?pageNum=${page.previousPageNum }&keyWords=${kw}&edu=${eduClieck}&months=${bean.name}"><font color="#fff"><b>${bean.name}(${bean.count})</b></font></a></span>
                    </c:when>
                    <c:otherwise>
                        <a href="/search/fact?pageNum=${page.previousPageNum }&keyWords=${kw}&edu=${eduClieck}&months=${bean.name}">${bean.name}(${bean.count})</a>
                    </c:otherwise>
                </c:choose>
            </c:forEach>
        </div>
    </c:if>
</div>
<div class="result">
    <c:if test="${! empty page.list }">
        <h5>为您找到相关结果约${total}个</h5>
        <c:forEach items="${page.list}" var="bean">
            <div id="qzyx"><b> ${bean.name}(${bean.expect_city} ${bean.months} 求职意向:${bean.expJob})</b></div>
            <div id="desc">工作经历:${bean.leastcom} ${bean.leastjob} ${bean.duration}
                <br/>
                教育经历:${bean.edu} ${bean.college} ${bean.major}
                <br/>
                <hr>
            </div>
        </c:forEach>

        <c:if test="${page.hasPrevious }">
            <a href="/search/fact?pageNum=${page.previousPageNum }&keyWords=${kw}&edu=${eduClieck}&months=${months}"> 上一页</a>
        </c:if>
        <c:forEach begin="${page.everyPageStart }" end="${page.everyPageEnd }" var="n">
            <a href="/search/fact?pageNum=${n }&keyWords=${kw}&edu=${eduClieck}&months=${months}"> ${n}</a> &nbsp;&nbsp;
        </c:forEach>

        <c:if test="${page.hasNext }">
            <a href="/search/fact?pageNum=${page.nextPageNum }&keyWords=${kw}&edu=${eduClieck}&months=${months}"> 下一页</a>
        </c:if>
    </c:if>
</div>
</body>
</html>